import request from '@/utils/request'

// 查询设备列表
export function listBasDevice(query) {
  return request({
    url: '/bas/basDevice/list',
    method: 'get',
    params: query
  })
}

// 查询仓库下拉框
export function listWarehouseOptions(query) {
  return request({
    url: '/bas/basWarehouse/warehouseOptions',
    method: 'get',
    params: query
  })
}

// 查询设备详细
export function getBasDevice(deviceId) {
  return request({
    url: '/bas/basDevice/' + deviceId,
    method: 'get'
  })
}

// 新增设备
export function addBasDevice(data) {
  return request({
    url: '/bas/basDevice',
    method: 'post',
    data: data
  })
}

// 修改设备
export function updateBasDevice(data) {
  return request({
    url: '/bas/basDevice',
    method: 'put',
    data: data
  })
}

// 删除设备
export function delBasDevice(deviceId) {
  return request({
    url: '/bas/basDevice/' + deviceId,
    method: 'delete'
  })
}
